package com.shycloud.mido.common.sms;

import com.google.gson.Gson;
import com.shycloud.mido.common.sms.sdk.CloopenSmsSDK;
import com.shycloud.mido.common.sms.service.CloopenSmsService;
import com.shycloud.mido.common.sms.service.CloopenSmsService;
import lombok.AllArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

/**
 * minio 自动配置类
 *
 * @author npc
 */
@AllArgsConstructor
public class SmsAutoConfiguration {

	@Bean
	@ConditionalOnMissingBean(CloopenSmsService.class)
	CloopenSmsService cloopenSms() {
		return new CloopenSmsService();
	}

	/**
	 * 配置gson为json解析工具
	 *
	 * @return
	 */
	@Bean
	public Gson gson() {
		return new Gson();
	}


	/**
	 * 构建七牛空间管理实例
	 */
	@Bean
	public CloopenSmsSDK cloopenSmsSDK() {
		return new CloopenSmsSDK();
	}
}
